package com.jsy.mini12306.ticketsales.service.impl;

import com.jsy.mini12306.ticketsales.entity.StationInLine;
import com.jsy.mini12306.ticketsales.mapper.StationInLineMapper;
import com.jsy.mini12306.ticketsales.service.StationToTrainLineService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: SongyangJi
 * @description:
 * @since: 2021/9/1
 */

@Slf4j
@Service("stationToTrainLineService")
public class StationToTrainLineServiceImpl implements StationToTrainLineService {

    @Resource
    StationInLineMapper stationInLineMapper;

    @Override
    public List<StationInLine> queryTrainLinesByDepartureStationId(int stationId) {
        return stationInLineMapper.selectStationInLinesByStationId(stationId);
        // TODO 时间上的过滤
    }

    @Override
    public List<StationInLine> queryTrainLinesByTerminalStationId(int stationId) {
        return stationInLineMapper.selectStationInLinesByStationId(stationId);
        // TODO 时间上的过滤
    }
}
